﻿#include "CmdLineChartSidebarFixedValueChanged.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdLineChartSidebarFixedValueChanged::CmdLineChartSidebarFixedValueChanged()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdLineChartSidebarFixedValueChanged::~CmdLineChartSidebarFixedValueChanged()
    {
    }

    bool CmdLineChartSidebarFixedValueChanged::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_lineChartSidebarFixedValueChanged(m_mainWindowId, m_allIndexList);
        return true;
    }

    void CmdLineChartSidebarFixedValueChanged::undo()
    {
    }

    void CmdLineChartSidebarFixedValueChanged::redo()
    {
        // execute();
    }

    void CmdLineChartSidebarFixedValueChanged::setLineChartSidebarFixedValueChanged(int mainWindowId, QList<int> allIndexList)
    {
        m_mainWindowId = mainWindowId;
        m_allIndexList = allIndexList;
    }

} // namespace PostCommand
